<?php 
if(@$_POST['btnSearch']){
	$txtid = trim($_POST['txtid']);
	$txtname = trim($_POST['txtname']);
	$txtemail = trim($_POST['txtemail']);
	($_POST['txtid']!='' && $_POST['txtid']!='ID') ? $order.=" AND id='{$txtid}' " : $order.='';
	($_POST['txtname']!='' && $_POST['txtname']!='Firstname') ? $order.=" AND firstname='{$txtname}' " : $order.='';
	($_POST['txtemail']!='' && $_POST['txtemail']!='Email') ? $order.=" AND email LIKE '%{$txtemail}%' " : $order.='';
}
?>
<div id="search">
<form action="" method="post" name="search">
	<input type="text" name="txtid" class="txt" value="<?php if(@$_POST['txtid']) echo $_POST['txtid']; else echo 'ID';?>" onclick="if(value=='ID') value=''" />
	<input type="text" name="txtname" class="txt" value="<?php if(@$_POST['txtname']) echo $_POST['txtname']; else echo 'Firstname';?>" onclick="if(value=='Firstname') value=''" />
	<input type="text" name="txtemail" class="txt" value="<?php if(@$_POST['txtemail']) echo $_POST['txtemail']; else echo 'Email';?>" onclick="if(value=='Email') value=''" />
    <input type="submit" name="btnSearch" value="Tìm" class="btn" />
</form>
</div>